excelRoot=../../excel
if [ ! -d $excelRoot ]; then
    echo "excel目录不存在"
    exit 1
fi

exportPy="$excelRoot/exporter/export_config.py"
python $exportPy --lang=lua -s $excelRoot ../modules --suffix=Config --case=camel_upper $@

if [ $? -eq 0 ]; then
    echo "服务器配置导出成功---------"
else
    echo "error: 服务器配置导出失败==========="
    exit 1
fi

echo "\n"

clientRoot=../../client
if [ ! -d $clientRoot ]; then
    echo "客户端目录不存在"
    exit 1
fi

clientScriptRoot=$clientRoot/assets/script
if [ ! -d $clientScriptRoot ]; then
    echo "客户端脚本目录不存在"
    exit 1
fi

python $exportPy --lang=ts -c $excelRoot $clientScriptRoot --suffix=Config --case=camel_upper $@